<template>
	<div id="tmpl">
		<div>
			<h4 v-text="desc.title"></h4>
			<p class="line"></p>
			<p v-html="desc.content"></p>
		</div>
	</div>
</template>

<script>
	import common from "../../kits/common.js";
	export default {
		data(){
			return {
				desc:{},
				id:0
			}
		},
		methods:{
			getimgdesc(){
				var url = common.apimain+"/api/goods/getdesc/"+this.id;
				this.$http.get(url).then(function(res){
					if(res.body.status!=0){
						alert(res.body.message);
					}
					this.desc=res.body.message[0];
				})
			}
		},
		created(){
			this.id=this.$route.params.id;
			this.getimgdesc()
		}
	}
</script>

<style scoped>
	#tmpl {
		padding: 5px;
	}
	
	#tmpl h4 {
		color: #0094ff;
	}
	
	#tmpl .line {
		height: 1px;
		border: 1px solid rgba(0, 0, 0, 0.3);
	}
</style>